﻿<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>简睿捷智能制造PDM系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <!-- Bootstrap -->
    <link href="Content/bootstrap.min.css" rel="stylesheet" />
    <script src="Scripts/jquery-1.10.2.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
    <!--angularJS-->
    <script src="Scripts/angular_1.5.8/angular.min.js"></script>
    <script src="Scripts/angular_1.5.8/angular-filter.min.js"></script>
    <!--resizableColumns-->
    <link href="Content/jquery.resizableColumns.css" rel="stylesheet" />
    <script src="js/store.min.js"></script>
    <script src="Scripts/jquery.resizableColumns.min.js"></script>
    <!--jridgecommon.js-->
    <script src="../Scripts/jridgecommon.js"></script>
    <!--图片预览-->
    <link rel="stylesheet" href="./imgviewer/imgviewer.min.css" />
    <script src="./imgviewer/imgviewer.min.js"></script>
    <!--文件上传-->
    <script src="../Scripts/stream-v1.js"></script>
    <link href="css/uploadfile.css" rel="stylesheet" />
    <!--AngularJS Service-->
    <script src="../Scripts/service/RightService.js"></script>
    <!--自己写的js和css-->
    <script src="js/pdm.js"></script>
    <link href="css/pdm.css" rel="stylesheet" />

</head>

<body ng-app="myApp" ng-controller="myCtrl" class="container-fluid" id="b">
    <!-------------------------顶部导航栏----------------------->
    <nav class="navbar navbar-default navbar-static-top navbar-fixed-top" role="navigation" id="navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#userinfo">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">{{userinfo.clientname}}-简睿捷PDM系统</a>
            </div>
            <div class="collapse navbar-collapse" id="userinfo">
                <ul class="nav navbar-nav">
                    <li>
                        <a>
                            <span class="glyphicon glyphicon-user"></span> {{userinfo.user.properties.name}}</a>
                    </li>
                    <li>
                        <a>IP：{{userinfo.ip}}</a>
                    </li>
                    <li>
                        <a style="cursor:pointer;" href="login.html">退出</a>
                    </li>
                    <li>
                        <a class="hidden" id="settings" onclick="window.jcloudandroid.showset();">
                            <span class="glyphicon glyphicon-cog"></span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    <!-------------------------顶部功能栏 mobile-------------------------->
    <form class="form mobile" role="form" ng-keydown="keydownSearch()" style="margin-top:5px;margin-bottom:5px;">
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-btn hidden"></span>
                <span class="input-group-btn" style="padding-right:10px;">
                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <span class="glyphicon glyphicon-tags"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li ng-repeat="label in labels">
                            <a ng-click="favoriteList($index)">{{label}}</a>
                        </li>

                        <li role="separator" class="divider"></li>
                        <li>
                            <a></a>
                        </li>
                    </ul>
                </span>
                <input type="text" class="form-control" ng-model="keyword" placeholder="关键词" />
                <span class="input-group-btn" style="padding-right:10px;">
                    <button class="btn btn-primary" type="button" ng-click="search()">
                        <span class="glyphicon glyphicon-search"></span>
                    </button>
                </span>
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" ng-click="includePath='list-view.html'" ng-class="{'list-view.html':'active'}[includePath]">
                        <span class="glyphicon glyphicon-th-list"></span>
                    </button>
                </span>
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" ng-click="includePath='grid-view.html'" ng-class="{'grid-view.html':'active'}[includePath]">
                        <span class="glyphicon glyphicon-th-large"></span>
                    </button>
                </span>
                <span class="input-group-btn">
                    <button class="btn btn-default" data-toggle="collapse" data-target="#filterBody">
                        <span class="glyphicon glyphicon-filter"></span>
                    </button>
                </span>

                <!--文件上传按钮
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" onclick="javascript:window.location.href='phone.html'">
                        <span class="glyphicon glyphicon-camera"></span>
                    </button>
                </span>-->

                <span class="input-group-btn hidden"></span>
            </div>
        </div>
    </form>
    <!-------------------------顶部功能栏 pc-------------------------->
    <nav class="navbar navbar-default pc">
        <!-- <button class="dropdown dropdown-toggle btn btn-primary navbar-btn navbar-left" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <span class="glyphicon glyphicon-tags"> 标签</span>
            <span class="caret"></span>
        </button> -->
        <ul class="dropdown-menu">
            <li ng-repeat="label in labels">
                <a ng-click="favoriteList($index)" style="cursor:pointer;">{{label}}</a>
            </li>
            <li role="separator" class="divider"></li>
            <li>
                <a data-toggle="collapse" data-target="#manageLabel">管理</a>
            </li>
        </ul>

        <form class="form-inline navbar-form navbar-left" role="search" ng-keydown="keydownSearch()">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="关键字" ng-model="keyword">
            </div>
            <div class="form-group">
                <button type="button" class="btn btn-default" ng-click="search()">
                    <span class="glyphicon glyphicon-search"> 搜索</span>
                </button>
            </div>
            <div class="form-group">
                <button type="button" class="btn btn-primary" ng-click="beforeUpload()" ng-hide="curFolderNames[curFolderNames.length - 1].id <= 0">
                    <span class="glyphicon glyphicon-upload"> 上传文档</span>
                </button>
            </div>
            <!-- <div class="form-group">
                <button type="button" class="btn btn-primary" ng-click="beforeNewFolder()">
                    <span class="glyphicon glyphicon-asterisk"> 新建文件夹</span>
                </button>
            </div> -->
        </form>
        <form class="navbar-form navbar-right">
            <div class="btn-group" role="group" aria-label="view">
                <button class="btn btn-default" ng-click="includePath='list-view.html'" ng-class="{'list-view.html':'active'}[includePath]">
                    <span class="glyphicon glyphicon-th-list"></span>
                </button>
                <button class="btn btn-default" ng-click="includePath='grid-view.html'" ng-class="{'grid-view.html':'active'}[includePath]">
                    <span class="glyphicon glyphicon-th-large"></span>
                </button>
                <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#filterBody">
                    <span class="glyphicon glyphicon-filter"></span>
                    <span class="hidden-xs">筛选</span>
                    <span class="caret"></span>
                </button>
            </div>
        </form>
    </nav>
    <!-------上传区域PC modal ------->
    <div class="modal fade" id="upload" tabindex="-1" role="dialog" aria-labelledby="uploadModal" aria-hidden="true">
        <div class="modal-dialog" style="width:640px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">上传</h4>
                </div>
                <div class="modal-body">
                    <div ng-include="'uploadfile.html'"></div>
                </div>
                <!-- /.modal-body -->
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
    <!-------------------------标签的添加与删除-------------------------->
    <div class="collapse" id="manageLabel">
        <div class="well">
            <form class="form-inline">
                <div class="btn-group" ng-repeat="label in labels">
                    <button class="btn btn-default">{{label}}</button>
                    <button class="btn btn-danger" ng-click="removeLabel($index)">
                        <span class="glyphicon glyphicon-remove"></span>
                    </button>
                </div>
                &nbsp; &nbsp;
                <div class="form-group">
                    <input type="text" class="form-control" ng-model="labelName" placeholder="标签名" />
                </div>
                <button type="button" class="btn btn-primary" ng-click="addLabel()">
                    <span class="glyphicon glyphicon-plus"></span>
                </button>
                &nbsp; &nbsp; &nbsp; &nbsp;
                <button class="btn btn-success" data-toggle="collapse" data-target="#manageLabel">ok</button>
            </form>
        </div>
    </div>
    <!-------------------------筛选-------------------------->
    <div class="collapse" id="filterBody">
        <div class="well">
            <form>
                <label class="checkbox-inline" ng-repeat="list in metaclass[meta.metaclass.SysDocumentRev].ClassMeta.Class.Properties.Property">
                    <input type="checkbox" ng-model="list['show']" ng-init="checkedname=true" />{{list['@displayname']}}
                </label>

            </form>
            <br />
            <form class="form-inline">
                <div class="form-group">
                    <input type="text" class="form-control" ng-model="fileName" placeholder="文档名称" />
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" ng-model="creator" placeholder="创建人名" />
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" ng-model="createdDate" placeholder="创建时间" />
                </div>
            </form>
        </div>
    </div>
    <!-------------------------路径导航-------------------------->
    <ol class="breadcrumb">
        <li>位置</li>
        <li ng-repeat="curFolderName in curFolderNames">
            <button type="button" class="btn btn-default" ng-click="goBack($index)">{{curFolderName.properties.name}}</button>
        </li>
    </ol>
    <!-------------------------loading动画-------------------------->
    <div ng-if="includePath=='loading.html'" ng-include="'loading.html'"></div>
    <!-------------------------内容部分 list方式显示-------------------------->
    <div ng-if="includePath=='list-view.html'" ng-include="'list-view.html'"></div>
    <!-------------------------内容部分 图片显示-------------------------->
    <div ng-if="includePath=='grid-view.html'" ng-include="'grid-view.html'"></div>
    <!-------------------------文档详情-------------------------->
    <!-------编辑区域 modal------->
    <div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="editModal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">{{obj.properties.name}}</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <div class="row">
                                <label class="col-md-3 control-label">名称：</label>
                                <div class="col-md-7">
                                    <input type="text" class="form-control" ng-model="obj.properties.name" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group" ng-repeat="property in metaclass[obj.type].ClassMeta.Class.Properties.Property">
                            <div class="row">
                                <label class="col-md-3 control-label">{{property['@displayname']}}：</label>
                                <div class="col-md-7">
                                    <input type="text" class="form-control" ng-model="obj.properties[property['@internalName'].toLowerCase()]" />
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- /.modal-body -->
                <div class="modal-footer">
                    <div class="row">
                        <!--暂时不开放web端的删除
                            <div class="col-md-6">
                            <button type="button" class="btn btn-danger pull-left" ng-click="onClickDelete()">删除</button>
                        </div>-->
                        <div class="col-md-6">
                            <button type="button" class="btn btn-success" ng-click="onClickSave()">保存</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭窗口</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->
    <!--新建文件夹区域 modal-->
    <div class="modal fade" id="newFolder" tabindex="-1" role="dialog" aria-labelledby="newFolderModal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title">新建文件夹</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">
                        <div class="form-group" ng-repeat="property in metaclass[obj.type].ClassMeta.Class.Properties.Property" ng-hide="property['@internalName'].toLowerCase()==='Creator'.toLowerCase() || property['@internalName'].toLowerCase()==='CreationDate'.toLowerCase()">
                            <div class="row">
                                <label class="col-md-3 col-sm-3 control-label">{{property['@displayname']}}：</label>
                                <div class="col-md-7 col-sm-7">
                                    <input type="text" class="form-control" ng-model="obj.properties[property['@internalName'].toLowerCase()]" />
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <!-- /.modal-body -->
                <div class="modal-footer">
                    <button type="button" class="btn btn-success navbar-btn" ng-click="batchdoRelation(parentObj,[obj],'PlmFolderHierarchy',17)">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭窗口</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!----------------------分页--------------------->
    <script type="text/javascript">
        $(function () {
            $("#main_list").resizableColumns({
                store: window.store
            });
        });

    </script>
</body>

</html>